package com.liuhaoqi.raletiveblog.service.Impl;

import com.liuhaoqi.raletiveblog.entity.Memory;
import com.liuhaoqi.raletiveblog.mapper.MemoryMapper;
import com.liuhaoqi.raletiveblog.result.business.PageResult.TimelinePageResult;
import com.liuhaoqi.raletiveblog.service.MemoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author liuhaoqi
 * @Date 2020/4/19 17:53
 * @Version 1.0
 */
@Service
public class MemoryServiceImpl implements MemoryService {
    @Autowired
    MemoryMapper memoryMapper;

    @Override
    public int updateMemoryByMemoryId(Memory memory) {
        return memoryMapper.updateMemoryByMemoryId(memory);
    }

    @Override
    public int deleteMemoryByMemoryId(int memoryId) {
        return memoryMapper.deleteMemoryByMemoryId(memoryId);
    }

    @Override
    public List<TimelinePageResult> getMemmoryListMang(int start, int end, int pagesize) {
        return memoryMapper.getMemmoryListMang(start,end,pagesize);
    }

    @Override
    public List<Memory> getMemoryList() {
        return memoryMapper.getMemoryList();
    }
}
